﻿/// ZaxControls
/// Programmed by Leland Ede
/// Website: http://www.zaxisstudios.com
/// E-Mail: codeplex@zaxis-studios.com
/// Create: 3/29/2014
/// Modified: 4/9/2014

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;

using ZaxLib.Web.Writers.Nodes;

namespace ZaxLib.Web.Writers
{
	/// <summary>
	/// Manage code for individual components
	/// </summary>
	public interface IWriter
	{
		/// <summary>
		/// Add code to the writer with type specifications
		/// </summary>
		/// <param name="code">Value of code to add</param>
		/// <param name="type">Type of code segment being added</param>
		//CodeNode AddCode(String tok, NodeType type);

		INode CreateTopNode();
		INode AddChild();
		INode AddChild(INode parent);
		INode AddChild(String value);
		INode AddChild(String valule, INode parent);
		INode AddChild(String key, String value);
		INode AddChild(String key, String value, INode parent);
		INode AddParam(String value);
		INode AddParam(String value, INode parent);
		INode AddParam(String key, String value);
		INode AddParam(String key, String value, INode parent);


		/// <summary>
		/// Write script out to user
		/// </summary>
		/// <returns></returns>
		void Write(HtmlTextWriter writer);

        INode Current
        {
            get;
            set;
        }

		void Clear();

		INode CreateReadyFunction();
		INode CreateReadyFunction(INode parent);
	}
}
